package Practice.Practice_02.UserManagementSystem;

import java.util.Objects;
import java.util.Scanner;

public class SearchName {
    public static void searchName(Person[] person){
        Scanner sc = new Scanner(System.in);
        System.out.println("输入要查询用户的姓名");
        String name = sc.nextLine();
        for (int i = 0; i < person.length; i++) {
            if (Objects.equals(person[i].getName(),name)) {
                System.out.println(person[i].getId() + " " + person[i].getName() + " "
                        + person[i].getPass() + " " + person[i].getEmail() + " " + person[i].getPower());
                System.out.println("=========================");
            }
        }
    }
}
